package com.ruoyi.prod.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.ruoyi.prod.enums.AuditState;
import com.ruoyi.prod.enums.UseTargetEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * <p>
 * 使用管理-资产使用
 * </p>
 *
 * @author 强子初
 * @since 2023-02-25
 */
@Getter
@Setter
@TableName("prod_use_apply")
@ApiModel(value = "资产使用对象", description = "使用管理-资产使用")
public class ProdUseApply extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty("使用单号")
    @TableField("odd")
    private String odd;

    @ApiModelProperty("使用对象;1-部门;2-个人;")
    @TableField("use_target")
    private UseTargetEnum useTarget;

    @ApiModelProperty("存放地点")
    @TableField("place")
    private String place;

    @ApiModelProperty("备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty("条目")
    @TableField(exist = false)
    private List<ProdUseApplyItem> item;

    @ApiModelProperty("审核状态")
    @OrderBy(sort = 5, asc = true)
    @TableField("audit_state")
    private AuditState auditState;

    @ApiModelProperty("审核状态集合")
    @TableField(exist = false)
    private List<AuditState> stateList;
}
